﻿using System;
using System.Collections.Generic;
using System.Text;

namespace log4net
{
    /// <summary>
    /// Common
    /// </summary>
    public class Common
    {
        /// <summary>
        /// RandomInt
        /// </summary>
        public static int RandomInt(int min, int max)
        {
            if (min == max)
                return min;
            else if (min < max)
                return min + Math.Abs(Guid.NewGuid().GetHashCode()) % (max - min + 1);
            else
                return max + Math.Abs(Guid.NewGuid().GetHashCode()) % (min - max + 1);
        }
    }
}
